home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Information / Digests / CSMP Digest / volume 1 / csmp-v1-164.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  42.4 KB  |  888 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Mon, 10 Aug 92       Volume 1 : Issue 164
  2.  
  3. Today's Topics:
  4.  
  5.     Is GetTicks accurate on Powerbooks?
  6.     THINK Pascal and MacApp 2.x (was Re: MacApp versus TCL)
  7.     Multiple transmissions using ADSP?! Help!
  8.     Is there anything other than MacinTalk?
  9.     Q: memory err -111 on HandToHand?
  10.     info on innards of Quicktime
  11.     Hide Others...
  12.     Weirdly, Exit Hangs Think Pascal If Debugging Is On
  13.     Palettes vs. Color Tables : need help
  14.     Debugging INITs
  15.  
  16.  
  17.  
  18. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  19.  
  20. The digest is a collection of article threads from the internet newsgroup
  21. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  22. regularly and want an archive of the discussions.  If you don't know what a
  23. newsgroup is, you probably don't have access to it.  Ask your systems
  24. administrator(s) for details.  (This means you can't post questions to the
  25. digest.)
  26.  
  27. Each issue of the digest contains one or more sets of articles (called
  28. threads), with each set corresponding to a 'discussion' of a particular
  29. subject.  The articles are not edited; all articles included in this digest
  30. are in their original posted form (as received by our news server at
  31. cs.uoregon.edu).  Article threads are not added to the digest until the last
  32. article added to the thread is at least one month old (this is to ensure that
  33. the thread is dead before adding it to the digest).  Article threads that
  34. consist of only one message are generally not included in the digest.
  35.  
  36. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
  37. [128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
  38. file /pub/mac/csmp-digest/README before downloading any files.  The most
  39. recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
  40. directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
  41. archive has a mail server; send a message with the text '$MACarch help' (no
  42. quotes) to LISTSERV@ricevm1.rice.edu for more information.
  43.  
  44. The digest is also available via email.  Just send a note saying that you
  45. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  46. automatically receive each new issue as it is created.  Sorry, back issues
  47. are not available through the mailing list.
  48.  
  49. Send administrative mail to mkelly@cs.uoregon.edu.
  50.  
  51.  
  52. -------------------------------------------------------
  53.  
  54. From: CHARLESW@QUCDN.QueensU.CA
  55. Subject: Is GetTicks accurate on Powerbooks?
  56. Date: 4 Jul 92 18:52:20 GMT
  57. Organization: Queen's University at Kingston
  58.  
  59.  
  60.   Do the power-saving or sleep features on a PowerBook prevent the use of
  61. GetTicks for calculating elapsed times?  I need accuracy of the order of a
  62. few seconds over an hour or two.
  63.  
  64.   Thanks,
  65.  
  66. .../dave   Dave Charlesworth
  67.  
  68. +++++++++++++++++++++++++++
  69.  
  70. From: keith@taligent.com (Keith Rollin)
  71. Date: 4 Jul 92 22:53:39 GMT
  72. Organization: Taligent
  73.  
  74. In article <92186.145220CHARLESW@QUCDN.QueensU.CA>, CHARLESW@QUCDN.QueensU.CA
  75. writes:
  76. >
  77. >Do the power-saving or sleep features on a PowerBook prevent the use of
  78. >GetTicks for calculating elapsed times?  I need accuracy of the order of a
  79. >few seconds over an hour or two.
  80. >
  81.  
  82. Couldn't you use GetDateTime or ReadDateTime instead? Since you only need to be
  83. accurate to a few seconds, then you shouldn't need the 1/60 second resolution
  84. that ticks give you. And Inside Mac warns you that TickCount (GetTicks is an
  85. Apple IIgs call) can easily skip a tick or two from time to time as interrupts
  86. are disabled, so it's not a good idea to use it for timing over a long period of
  87. time.
  88.  
  89. - --
  90. Keith Rollin
  91. Phantom Programmer
  92. Taligent, Inc.
  93.  
  94.  
  95. +++++++++++++++++++++++++++
  96.  
  97. From: CHARLESW@QUCDN.QueensU.CA
  98. Date: 5 Jul 92 03:46:43 GMT
  99. Organization: Queen's University at Kingston
  100.  
  101.  
  102.   The problem with GetDateTime et al. is that if the user changes the time then
  103. the calculation of elapsed time will be wrong.  GetTicks doesn't have this
  104. drawback.  This application may be used while travelling (suppose I had
  105. money for both a PowerBook AND a return ticket to Cupertino...), or while a
  106. person adjusts their clock (some people use an automated utility to adjust
  107. their clocks daily).
  108.  
  109.   In summary then, I either need to time things independently of the "time",
  110. or I need to know when the user has adjusted the clock.
  111.  
  112.   Thanks for your prompt suggestions.
  113.  
  114.   Cheers,
  115.  
  116. .../dave   Dave Charlesworth
  117.  
  118. +++++++++++++++++++++++++++
  119.  
  120. From: baker4@husc10.harvard.edu (David Baker)
  121. Date: 6 Jul 92 09:41:24 GMT
  122. Organization: Department of Psychology, Harvard University
  123.  
  124. In article <92186.145220CHARLESW@QUCDN.QueensU.CA> CHARLESW@QUCDN.QueensU.CA wr   peirce@outpost.SF-Bay.org
  125. - --  Peirce Software     --   Suite 301, 719 Hibiscus Place
  126. - --                      --   San Jose, California USA 95117
  127. - --  Makers of...        --   voice: (408) 244-6554 fax: (408) 244-6882
  128. - --            SMOOTHIE  --   AppleLink: peirce & America Online: AFC Peirce
  129.  
  130. +++++++++++++++++++++++++++
  131.  
  132. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  133. Organization: Kalamazoo College
  134. Date: Wed, 8 Jul 1992 13:10:21 GMT
  135.  
  136. peirce@outpost.SF-Bay.org (Michael Peirce) writes:
  137. >
  138. >The only problem I've run into is that lots of people don't seem to
  139. >set their time zone.  Your software can figure this out by noticing
  140. >a delta off GMT of zero.  Of course, there are some people who HAVE
  141. >a delta off GMT of zero.  My solution to this was to ask once if they
  142. >had forgotten to set the timezone or if they really were on GMT.
  143.  
  144. I always figured you could check latitude and longitude to see if they
  145. were (0,0)...
  146. - -- 
  147.  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
  148.  Life is a merry merry-go-round;  try to learn the secret I have found.
  149.  Free and easy, easy and free.  That's the way it's gotta be.
  150.  
  151. +++++++++++++++++++++++++++
  152.  
  153. From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
  154. Date: 8 Jul 92 13:55:52 GMT
  155. Organization: University of Illinois at Urbana-Champaign
  156.  
  157. peirce@outpost.SF-Bay.org (Michael Peirce) writes:
  158. >You can adjust for timezones on the Mac.  Its easy.
  159.  
  160. And what about the timestamps on files in the filesystem?
  161. It doesn't bother you that by "adjusting for timezones" you can put
  162. your files into the future (or age them prematurely)?
  163.  
  164. I won't even say "Daylight Savings Time", because it's not supported
  165. (unless somebody can tell me exactly how "dlsDelta" is supposed to 
  166. be used, a question I have often asked).
  167.  
  168. >Of course, there are some people who HAVE
  169. >a delta off GMT of zero.  My solution to this was to ask once if they
  170. >had forgotten to set the timezone or if they really were on GMT.
  171.  
  172. The Script Manager documentation claims that <0,0,0> means uninitialized.
  173. So you really should only have to do this for people on the equator at
  174. exactly 0 longitude.  This is in the Atlantic Ocean, somewhere near Lagos.
  175. - -- 
  176. Steve Dorner, Official Lame Duck, U of Illinois Computing Services Office
  177. Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
  178.  
  179. ---------------------------
  180.  
  181. From: sawtelle@mariposa.stonecutter.com (Don Sawtelle)
  182. Subject: THINK Pascal and MacApp 2.x (was Re: MacApp versus TCL)
  183. Date: 8 Jul 92 08:49:57 GMT
  184. Organization: Stonecutter Software
  185.  
  186. In article <lsr-060792133924@lsr.taligent.com> (comp.sys.mac.programmer), lsr@taligent.com (Larry Rosenstein) writes:
  187. > Also, you can use MacApp from MPW Object Pascal.  (Or if you have THINK
  188. > Pascal, you may be able to get MacApp 2.x and use MacApp from THINK
  189. > Pascal.)
  190.  
  191. I have long been a happy advocate of THINK Pascal's fast turnaround
  192. time for MacApp 2.x development. But I have also long suffered the bugs
  193. in Think Pascal that come out of the woodwork when you use it to debug
  194. large MacApp programs. Now I have resigned myself to thinking that
  195. Think Pascal will probably never be solid for MacApp development--
  196. because there aren't many people using MacApp with Think Pascal, and
  197. the number will likely keep dropping given the success of the C++
  198. emphasis of MacApp 3. For that matter, I'm not sure why Symantec would
  199. put the effort into another major rev of Think Pascal, except as part
  200. of maintaining a presence whatever education markets may still be doing
  201. a lot of Pascal.
  202.  
  203. Therefore I caution those who haven't already made the investment in
  204. figuring out how to live with the problems: avoid using Think Pascal
  205. for MacApp development.
  206.  
  207. For example:
  208.  
  209. Reset is dangerous. If a bug makes it impossible for me to Quit from the
  210. application being debugged I reboot rather than Reset. Otherwise Think
  211. Pascal crashes later. (sooner? :-)
  212.  
  213. You can't use the Think debugger to debug failure handling during
  214. application initialization. If you do, Think Pascal crashes. In order
  215. to do any debugging of failure handling during application
  216. initialization, you have to (for example) split your custom application
  217. initialization off from MacApp's built-in application initialization
  218. and use a flag to trigger yours during the first cycle of the event loop. 
  219.  
  220. Some have reported incompatibility between 4.0.1 and the special
  221. versions of Failure that make it possible to use the THINK Pascal
  222. debugger after a failure has occurred. In some cases, this may be
  223. specific to the Quadra. I don't know; I decided to stick with 4.0.
  224.  
  225. Projects sometimes get corrupted. They can't be fixed by removing
  226. objects and recompiling everything--you have to create a new project
  227. from scratch. Corrupted projects can cause weird symptoms that look
  228. like bugs in your application, causing major false bug-hunt sidetracks
  229. that eat gobs of time before you finally find that rebuilding the
  230. project from scratch makes everything work just perfectly.
  231.  
  232. Some of these problems might be fixed in 4.0.1, I don't know. My
  233. attempt to use 4.0.1 on a large MacApp application failed miserably--I
  234. experienced repeated not-enough-memory errors (when there was enough)
  235. and crashes during compiles, without ever having run the
  236. application--which is why I went running back to 4.0.
  237.  
  238. Other than these serious problems Think Pascal is a great environment
  239. for MacApp development. I live with the problems in order to avoid
  240. the slow turnaround of MPW and because I like the Think Pascal
  241. debugger. I'm still using MacApp 2 because I've been working on a
  242. mature, stable application that I wrote before MacApp 3 existed. I
  243. wouldn't start a new project in MacApp 2.
  244.  
  245. In general I like the Think compilers, but I find that Think Pascal has
  246. repeatedly fallen short of the mark for MacApp development. And at this point
  247. the economics probably don't justify trying to fix the problem, given the
  248. decline of MacApp 2 and Object Pascal.
  249.  
  250. Don
  251.  
  252. - ---
  253. Don Sawtelle:Stonecutter Software:Mariposa, CA
  254. sawtelle@stonecutter.com
  255.  
  256. +++++++++++++++++++++++++++
  257.  
  258. From: siegel@world.std.com (Rich Siegel)
  259. Organization: GCC Technologies
  260. Date: Wed, 8 Jul 1992 12:08:35 GMT
  261.  
  262. In article <01050131.7vui47@mariposa.stonecutter.com> sawtelle@stonecutter.com writes:
  263. >
  264. >I have long been a happy advocate of THINK Pascal's fast turnaround
  265. >time for MacApp 2.x development. But I have also long suffered the bugs
  266. >in Think Pascal that come out of the woodwork when you use it to debug
  267. >large MacApp programs. Now I have resigned myself to thinking that
  268. >Think Pascal will probably never be solid for MacApp development--
  269.  
  270. [enumerates problems using MacApp with THINK Pascal]
  271.  
  272. In general, the instabilities encountered when using MacApp in THINK
  273. Pascal are traceable back to one simple problem: MacApp was never
  274. intended for use with anything other than MPW.
  275.  
  276. MacApp 2.0 made use of new language constructs which were (at the
  277. time) supported only by the MPW Pascal compiler; it was clear that
  278. many of these extensions were added purely to support MacApp, and for
  279. no other reason.
  280.  
  281. At runtime, the MacApp architecture made lots of assumptions about the
  282. environment it was running in; initially, MacApp assumed that (a) it
  283. owned the window list; (b) its code resources and all other
  284. application resources were in the same resource file, and (c) a number
  285. of other little things which are only true when running as a
  286. standalone application. MacApp plays all kinds of little games with
  287. the machine which should only be played by one at a time, such as
  288. installing exception vector hooks, bottlenecking some of the same
  289. traps that THINK Pascal itself bottlenecks, and so forth.
  290.  
  291. The bottom line is that MacApp and THINK Pascal are not an entirely
  292. happy mixture. Don's experiences are pretty rare - many MacApp users
  293. don't seem to have problems (or if they do, they don't report them) -
  294. but they're not unique either. The turnaround time is superior, and
  295. things generally work well, but when push comes to shove, things
  296. break.
  297.  
  298. The original MacApp conversion for THINK Pascal was done under heavy
  299. marketing pressure, applied by a vocal minority. It was started when
  300. there was no clear idea of the scope of effort involved, took longer
  301. than expec. The
  302. problems might still outweigh the benefits.
  303.  
  304. If you can write your game without broadcasts using a higher level
  305. protocol, do it. Appletalk isn't really designed for broadcasts.
  306.  
  307. If only we had more intelligent and faster hardware network support,
  308. there would be no need to use tricks to make communications to multiple
  309. clients fast. (Ethertalk is fast enough. Localtalk is slow and processor-
  310. intensive.)
  311.  
  312. - -- 
  313.   Juri Munkki                           Windsurf: fast sailing
  314.  jmunkki@hut.fi                          Macintosh: fast software
  315.  
  316. +++++++++++++++++++++++++++
  317.  
  318. From: yjc@po.cwru.edu (Jerome Chan)
  319. Date: 2 Jul 92 02:44:40 GMT
  320. Organization: Alethea, The Twilight World!
  321.  
  322. In article <1992Jul1.223250.5195@nntp.hut.fi> Juri Munkki,
  323. jmunkki@vipunen.hut.fi writes:
  324. >Further problems:
  325. >
  326. >    o   DDP broadcasts only reach one physical zone. 
  327. >    o   DDP only makes a best effort to send a packet.
  328. >        It never resends or checks for lost packets.
  329. >    o   DDP packet size is limited.
  330. >    o   You have to write a socket listener is assembly language.
  331.  
  332.   I've arrived at the same conclusion after some hours ripping through
  333. Inside Macintoshes, the Q & A stack (4.0.9) and very helpful mail from
  334. several Net Persons. Thanks People!
  335.  
  336.   The Q & A stack also says that broadcasting data tends to slow down
  337. other Macintoshes on the network, so broadcasting is out of the question
  338. (Besides my network manager would kill me! :)). I'll most probably have a
  339. little loop that resends the same data over and over again.
  340.  
  341.   I'm not too worried about lost packets as the data is very time
  342. critical and missing a few packets won't affect the game much (I hope 
  343. :)) and the size of the data packets aren't that big.
  344.  
  345.   What's wrong with the default DDP socket listener provided by Apple? Is
  346. there a problem with it? Why do I have to write my own socket listener?
  347.  
  348.   Thanks also to Stuart Cheshire <cheshire@cs.stanford.edu> for sharing
  349. his DDP loop idea where each macintosh relays each packet from one
  350. machine to another in a circle. Thanks also to jimc@large.isc-br.com (Jim
  351. Cathey), "Mike Shoemaker" <mike_shoemaker@gateway.qm.apple.com>,
  352. milton@ccu.UManitoba.CA (Dave Milton) and Peter N Lewis
  353. <peter@cujo.curtin.edu.au> for their advice.
  354.  
  355.   Apple, please defragement your documentation as fast as possible.
  356. Searching through Tech Notes, Hypercard Stacks and Inside Macintosh is
  357. not fun. Please, please, pretty please. :)
  358.  
  359. - ---
  360.  Fading
  361.  
  362. +++++++++++++++++++++++++++
  363.  
  364. From: jmunkki@vipunen.hut.fi (Juri Munkki)
  365. Organization: Helsinki University of Technology
  366. Date: Thu, 2 Jul 1992 16:32:20 GMT
  367.  
  368. In article <1992Jul2.024440.18058@usenet.ins.cwru.edu> Jerome Chan <yjc@po.cwru.edu> writes:
  369. >  What's wrong with the default DDP socket listener provided by Apple? Is
  370. >there a problem with it? Why do I have to write my own socket listener?
  371.  
  372. I think it had problems with MultiFinder, but I'm not sure. Anyway, I think
  373. it exists only in the old Pascal-style interfaces. Correct me if I'm wrong.
  374.  
  375. Before you go off and write your own stuff, you should probably check out
  376. the ADSP and NBP classes that were posted at ftp.brown.edu just a few days
  377. ago. I'll certainly try them if I need to do some network programming.
  378. Objects should make networking much easier than it is now and I have heard
  379. only good things about ADSP.
  380.  
  381. - -- 
  382.   Juri Munkki                           Windsurf: fast sailing
  383.  jmunkki@hut.fi                          Macintosh: fast software
  384.  
  385. ---------------------------
  386.  
  387. From: ahn@mpx2.lampf.lanl.gov (Hyo E. Ahn)
  388. Subject: Is there anything other than MacinTalk?
  389. Organization: Los Alamos National Laboratory
  390. Date: Wed, 1 Jul 1992 10:02:00 GMT
  391.  
  392.  
  393.     Is there anything other than Macintalk to generate human voice?
  394.     I am curious to know if it's possible to have some color in generating
  395.     human voice (e.g., child voice).
  396.  
  397.     
  398.     Hyo Ahn, Los Alamos National Laboratory
  399.  
  400.     Bitnet:        AHN@LAMPF
  401.     Internet:    AHN@DAC.LAMPF.LANL.GOV
  402.  
  403. +++++++++++++++++++++++++++
  404.  
  405. From: haynes@mace.cc.purdue.edu (Carl W. Haynes III)
  406. Date: 1 Jul 92 18:46:26 GMT
  407. Organization: Purdue University
  408.  
  409. In article <1JUL199204021097@mpx2.lampf.lanl.gov> ahn@mpx2.lampf.lanl.gov (Hyo E. Ahn) writes:
  410. >
  411. >    Is there anything other than Macintalk to generate human voice?
  412. >    I am curious to know if it's possible to have some color in generating
  413. >    human voice (e.g., child voice).
  414.  
  415. On page 92 of the July issue of Byte there is a little blurb about the
  416. Sound Bytes Developer's Kit which is described as letting you
  417. incorporate speech Synthessis into new or existing Mac applications.
  418. This is all I know about it, I called and they're supposed to send me
  419. info about it. Contact is listed as:
  420.  
  421.   Emerson & Stern Associates
  422.   10150 Sorento Valley Rd.
  423.   Suite 210
  424.   San Diego, CA 92121
  425.   voice: 619-457-2526
  426.   fax: 619-457-1876
  427.  
  428. Price is listed at $3750.00 plus run-time license fees, obviously aimed
  429. at commercial developers.
  430. I'd be happy to post more info when I get the literature, if there's interest.
  431.  
  432. Then again, there's always Apple's new text-to-speech synthesiser they've 
  433. been talking about for years. Although they have given no hint of
  434. a release date.
  435.  
  436. carl
  437.  
  438.  
  439. - --
  440. Carl W. Haynes III  
  441. Haynes Consulting Services        ||  CWH3@aol.com
  442. PO Box 2715                       ||  haynes@mace.cc.purdue.edu
  443. W. Lafayette, IN 47906            ||  voice: 317 463-6383
  444. - ----------------------------------------------------------------------
  445.                   Macintosh Programming & Consulting
  446.  
  447. ---------------------------
  448.  
  449. From: felciano@summit.stanford.edu (Ramon M. Felciano)
  450. Subject: Q: memory err -111 on HandToHand?
  451. Date: 1 Jul 92 22:56:27 GMT
  452. Organization: DSO, Stanford University
  453.  
  454. I'm trying to make a copy of a handle grabbed from my TE record.
  455.  
  456. I pull it out of the record, then do a HandToHand on it. I get -111 as
  457. a result (memWZerr), which THINK Reference says means I tried to
  458. operate on a "free" block. What does that mean?
  459.  
  460. Thanks!
  461.  
  462. Ramon
  463.  
  464. +++++++++++++++++++++++++++
  465.  
  466. From: neal@farallon.com (Neal Trautman)
  467. Date: 2 Jul 92 12:39:38 GMT
  468. Organization: Farallon Computing, Inc.
  469.  
  470. In article <1992Jul1.225627.10917@leland.Stanford.EDU>, felciano@summit.stanford.edu (Ramon M. Felciano) writes:
  471. > I'm trying to make a copy of a handle grabbed from my TE record.
  472. > I pull it out of the record, then do a HandToHand on it. I get -111 as
  473. > a result (memWZerr), which THINK Reference says means I tried to
  474. > operate on a "free" block. What does that mean?
  475.  
  476. I ran into this just yesterday.  It turned out in my
  477. case that some "other" software was building the handle
  478. by having a global handle variable that pointed to a
  479. global pointer variable that pointed to 10 bytes of global
  480. data that contained region data.  In which case the
  481. handle's data was not in a valid heap zone.  I think
  482. the way I am going to fix it is to call NewHandle
  483. and BlockMove instead of HandToHand.  Since the data
  484. is a region, I'll just use the rgnSize field.
  485.  
  486. - --
  487. Neal Trautman
  488. Timbuktu Lead Software Engineer
  489. Farallon Computing, Inc.
  490. neal@farallon.com
  491.  
  492.  
  493. +++++++++++++++++++++++++++
  494.  
  495. From: gibson@silvertone.Princeton.EDU (John Gibson)
  496. Organization: Princeton University
  497. Date: Thu, 2 Jul 1992 14:33:35 GMT
  498.  
  499. In article <298@farallonfarallon.com> neal@farallon.com (Neal Trautman) writes:
  500. >In article <1992Jul1.225627.10917@leland.Stanford.EDU>, felciano@summit.stanford.edu (Ramon M. Felciano) writes:
  501. >> 
  502. >> I'm trying to make a copy of a handle grabbed from my TE record.
  503. >> 
  504. >> I pull it out of the record, then do a HandToHand on it. I get -111 as
  505. >> a result (memWZerr), which THINK Reference says means I tried to
  506. >> operate on a "free" block. What does that mean?
  507. >> 
  508. >
  509. >I ran into this just yesterday.  It turned out in my
  510. >case that some "other" software was building the handle
  511. >by having a global handle variable that pointed to a
  512. >global pointer variable that pointed to 10 bytes of global
  513. >data that contained region data.  In which case the
  514. >handle's data was not in a valid heap zone.  I think
  515.  
  516. Remember also that HandToHand takes a pointer to a Handle,
  517. not a Handle. From MacProtos.h:
  518.  
  519. pascal OSErr HandToHand(Handle *h);
  520.  
  521. I vaguely remember getting that error when I passed a Handle
  522. instead.
  523.  
  524. So it should be
  525.  
  526. Handle aValidHandle;
  527.  
  528. result = HandToHand(&aValidHandle);
  529.  
  530. - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  531. John Gibson                          Princeton Univ. Dept. of Music
  532. gibson@silvertone.Princeton.EDU
  533.  
  534. ---------------------------
  535.  
  536. From: babb@ucselx.sdsu.edu (babb j)
  537. Subject: info on innards of Quicktime
  538. Date: 6 Jul 92 17:57:05 GMT
  539. Organization: San Diego State University Computing Services
  540.  
  541.  
  542. I'm looking for a couple of definitve articles about QuickTime. What I'd
  543. like to know about are: the algorithms used, the format(s) of mooV-ies,
  544. are as many frames loaded into available memory as possible or is the 
  545. working space for a movie a set size and region?, etc. If you know of any
  546. please lemme know. 
  547. Thanx, Jeff.
  548.  
  549. - -- 
  550. Jeff Babb - Programmer/Technical Support - San Diego State University
  551. Language Acquisition Resource Center (L.A.R.C.) (619)594-4475 
  552. babb@ucsvax.sdsu.edu  
  553. .."now go away or I shall taunt you a second time" M.P.& T.H.G. 
  554.  
  555. +++++++++++++++++++++++++++
  556.  
  557. From: ivanski@world.std.com (Ivan M CaveroBelaunde)
  558. Date: 7 Jul 92 14:51:09 GMT
  559. Organization: The World Public Access UNIX, Brookline, MA
  560.  
  561. babb@ucselx.sdsu.edu (babb j) writes:
  562.  
  563.  
  564. >I'm looking for a couple of definitve articles about QuickTime. What I'd
  565. >like to know about are: the algorithms used, the format(s) of mooV-ies,
  566. >are as many frames loaded into available memory as possible or is the 
  567. >working space for a movie a set size and region?, etc. If you know of any
  568. >please lemme know. 
  569. >Thanx, Jeff.
  570.  
  571. The algorithms used will vary; part of QuickTime is a plug-in architectural
  572. construct (the Component Manager) that allows you to use any algorithm
  573. at all. The built in ones are three (really four, but the fourth one is a
  574. "mock" algorithm that does no compression at all, just bit depth conversion
  575. with or without error diffusion):
  576.     1. Animation Compressor: Uses an optionally lossy run-length coder
  577.         for compressing the images at various bit depths. It can
  578.         only be lossy in non-indexed bit depths (ie 16/24/32 bpp).
  579.     2. Photo Compressor: Uses the ISO JPEG algorithm to compress 24 bpp
  580.         images. High quality, compact compression, trades off with
  581.         lack o' speed. Also gets nasty artifacts on sharp edges.
  582.     3. Video Compressor: Proprietary optionally lossy algorithm developed
  583.         by Apple. Designed to decompress at reasonable speeds to
  584.         permit video playback. Implementation details of the
  585.         algorithm are not readily available, but it is licensable
  586.         (and a number of people have signed up, I believe).
  587.  
  588. The format of movies: it depends on what you mean. There are two formats
  589. for movies: a public movie format, which is used to save and load movies
  590. to/from disk, which is too complex to describe in detail here but which is
  591. extensively described in the QuickTime documentation. The private movie
  592. format is what the movie looks like when it's in memory: for all intents
  593. and purposes, the Movie data type is an abstract container. The contents
  594. are undocumented, and only accessible programatically. Peeking in them is
  595. very much a no-no, since it's way likely that they'll change. Both the
  596. private and public movie formats, however, do not contain any playable
  597. media data at all. Rather, they are a complex set of "pointers," if you
  598. will, into one or more data files that contain the data that describes the
  599. media (sampled sound data, compressed image data, etc.).
  600.  
  601. Finally, movies have a "format" in a sense of the sampled digital data that
  602. the media actually consists of. This "format" is really determined by the
  603. "pointers" in the Movie format described above, where the data file is
  604. effectively a sequence of digitized samples, and the "pointers" provide
  605. information about the location and size of the samples in the data stream,
  606. as well as information about the nature of the samples themselves (if it's
  607. a compressed image, what compressor was used for it; if sound data, stuff
  608. like sampling rate, etc.). The format of the samples themselves will vary
  609. with the type of the sample. Some, such as chunks of digitized uncompressed
  610. sound, or images compressed with standard algorithms like JPEG, will be
  611. straightforward to extract and "parse." Others, such as compressed images
  612. in proprietary algorithms such as Apple's Video Compressor (Road Pizza),
  613. are nigh impossible unless you license the stuff from Apple.
  614.  
  615. Memory usage: It depends; the programmer can ask QuickTime to load
  616. specific parts of a Movie into RAM (LoadMovieIntoRAM/LoadMediaIntoRAM calls)
  617. for faster playback. In the course of normal playback, QuickTime will fetch
  618. the data from disk as requested by the movie's clock. QuickTime will also
  619. attempt to cache part of it (each track has a 64K cache associated with it)
  620. for faster retrieval.
  621.  
  622. I'm not sure what you mean by "is the working space for a movie a set size
  623. or region." If you're talking about memory, QuickTime will scavenge memory
  624. from all kindsa places, and if it can't get what it needs, it will not play
  625. that frame/frames that are being troublesome.  Spatially, you can make the
  626. "working space" any size or any region (by using clipping), but the bigger
  627. your movie is the more stress it places on machine resources and thus
  628. it'll be more likely to fail to play properly on lower end machines, or
  629. on CD-ROMs, or, if you make it big enough, it might not even play on a
  630. Quadra... ;)
  631.  
  632. Hope this helps,
  633.  
  634. - -Ivanski
  635.  
  636. - ---
  637. Ivan Cavero Belaunde
  638. Visualist
  639. DiVA Corporation
  640.  
  641.         "A tu escuela llegue, sin entender por que llegaba,
  642.          En tus salones encuentro, mil caminos y encrucijadas,
  643.          Y aprendo mucho ... Y no aprendo na'a ...
  644.          !Maestra vida, camara', te da, te quita, te quita y te da..."
  645.                 - Ruben Blades, "Maestra Vida"
  646.  
  647. ---------------------------
  648.  
  649. From: jth@acpub.duke.edu (JASON HOLTZAPPLE)
  650. Subject: Hide Others...
  651. Date: 1 Jul 92 02:17:51 GMT
  652. Organization: Duke University; Durham, N.C.
  653.  
  654.  
  655.   I'm posting this on behalf of a friend who does not have access to
  656. this newsgroup, but his question has me baffled too:
  657.   Is there a way to send a "Hide Others" command from within an
  658. application? I'm assuming you would have to get the handle to the
  659. application menu and then simulate a mouse down on that selection.
  660. I can't find anything in IM to help. What's the best way to go about
  661. this?
  662. Thanks in advance,
  663. Jason Holtzapple
  664. - -- 
  665. jth@acpub.duke.edu
  666.  
  667. +++++++++++++++++++++++++++
  668.  
  669. From: ivanski@world.std.com (Ivan M CaveroBelaunde)
  670. Date: 7 Jul 92 14:12:21 GMT
  671. Organization: The World Public Access UNIX, Brookline, MA
  672.  
  673. It's not quite legal to do so (you have to rely on undocumented info) but
  674. it's possible. Basically, you need to peek into the menu list with
  675. Macsbug to find out the menu ID of the application menu and then use
  676. the SystemMenu trap to execute it.
  677.  
  678. Be forewarned that the menu ID of the app menu is not officially documented
  679. and you'll probably need to rev your software in the future. You might want
  680. to do some sanity checks to see if it's possible the ID you have in your
  681. code is not valid (get the menu handle and do some sanity checks on that,
  682. or check the system version before doing it and only do it if it's on a
  683. system that you KNOW has that ID for the app menu, etc).
  684.  
  685. Hope this helps,
  686.  
  687. - -Ivan
  688.  
  689. Ivan Cavero Belaunde (ivanski@world.std.com)
  690. Visualist
  691. DiVA Corporation
  692.  
  693.     "A tu escuela llegue, sin entender por que llegaba,
  694.      En tus salones encuentro, mil caminos y encrucijadas,
  695.      Y aprendo mucho ... Y no aprendo na'a ...
  696.      !Maestra vida, camara', te da, te quita, te quita y te da..."
  697.         - Ruben Blades, "Maestra Vida"
  698.  
  699. ---------------------------
  700.  
  701. From: orpheus@reed.edu (P. Hawthorne)
  702. Subject: Weirdly, Exit Hangs Think Pascal If Debugging Is On
  703. Date: 7 Jul 92 11:02:53 GMT
  704. Organization: Reed College, Portland OR
  705.  
  706. The following program hangs Think Pascal if and only if debugging is on.
  707. Why? I've reinstalled the Think Pascal 4.0.1 application, created new
  708. projects, done everything else I can think of, and it still does it.
  709. It didn't used to, as I recall.
  710.  
  711. program Something;
  712.  procedure Test;
  713.   procedure Check (aCondition: Boolean);
  714.  
  715.   begin
  716.    if not aCondition then
  717.     Exit(Test);
  718.   end;
  719.  
  720.  begin
  721.   Check(false);
  722.  end;
  723.  
  724. begin
  725.  Test;
  726. end.
  727.  
  728. All of the segments are locked, neither code optimizations nor compiler
  729. directives nor runtime libraries make any difference. 
  730.  
  731. This has me stumped. As you have probably guessed, the program above is
  732. the result of a long and particularly frustrating bug hunt. 
  733.  
  734. Once upon a time, I found that I could not perform the equivalent of a 
  735. longjmp out of static links in Think Pascal, and never quite figured
  736. out why not. Oh man, you wanna talk about wacky...
  737.  
  738. Theus (orpheus@reed.edu)
  739.  
  740. +++++++++++++++++++++++++++
  741.  
  742. From: siegel@world.std.com (Rich Siegel)
  743. Date: 7 Jul 92 12:01:37 GMT
  744. Organization: GCC Technologies
  745.  
  746. In article <1992Jul7.110253.22244@reed.edu> orpheus@reed.edu (P. Hawthorne) writes:
  747.     [ hangs when doing an uplevel exit() from a nested function ]
  748.  
  749. A bug, which, as far as I know, will be fixed in the next patch of THINK
  750. Pascal. In the meantime, you can either live with it or go back to 4.0,
  751. which shouldn't have this problem.
  752.  
  753. R.
  754.  
  755.  
  756.  
  757. - -- 
  758. - -----------------------------------------------------------------------
  759. Rich Siegel                              Internet: siegel@world.std.com
  760. Software Engineer & Toolsmith
  761. GCC Technologies
  762.  
  763. ---------------------------
  764.  
  765. From: nextweek@reed.edu!nextweek.Reed.Edu!pcalahan (Patrick John Calahan)
  766. Subject: Palettes vs. Color Tables : need help
  767. Date: 7 Jul 92 17:14:29 GMT
  768. Organization: Reed College, Portland, OR
  769.  
  770. I am writing a game and am trying to figure out how to deal with color.   
  771. Animation in the game is through copybits-ing pixmaps, and i would like to  
  772. do additional color animation by animating the palette or color table.
  773.  
  774. My question is, should I even deal with palettes, or should i animate the  
  775. color table directly?  Since speed is of the essence, I don't want
  776. copybits to be slowed down with any color translation...or maybe this
  777. isn't a problem?
  778.  
  779. I'm only beginning to dig into color quickdraw, so any advice on  
  780. whether/how I should deal with the Palette Manager would be appreciated.
  781.  
  782. Thanks
  783.  
  784. +++++++++++++++++++++++++++
  785.  
  786. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  787. Organization: Kalamazoo College
  788. Date: Tue, 7 Jul 1992 18:43:26 GMT
  789.  
  790. nextweek@reed.edu!nextweek.Reed.Edu!pcalahan (Patrick John Calahan) writes:
  791. >I am writing a game and am trying to figure out how to deal with color.   
  792. >Animation in the game is through copybits-ing pixmaps, and i would like to  
  793. >do additional color animation by animating the palette or color table.
  794. >
  795. >My question is, should I even deal with palettes, or should i animate the  
  796. >color table directly?  Since speed is of the essence, I don't want
  797. >copybits to be slowed down with any color translation...or maybe this
  798. >isn't a problem?
  799.  
  800. It's not a problem if you do it right.  What you want to do is use the
  801. Palette Manager to get to a screen's color table as directly as
  802. possible, thereby garnering for yourself all the benefits of the P.M.
  803. (compatibility, not having to worry about restoring colors) without the
  804. side-effects of the C.M. (incompatibility, having to worry about
  805. restoring colors).
  806.  
  807. N.B.:  You gotta give up the first and the last color in the CLUT to do
  808. this, since the P.M. won't ever touch those.  If that's not OK, take a
  809. deep breath and prepare to sink yourself into the Color Manager...
  810.  
  811. What you want to do is tell CopyBits that your source pixmap will be
  812. using the exact same color table as your destination pixmap, so that
  813. CopyBits will say, "oh, ok, well I guess I don't need to look at what
  814. I'm copying then, I'll just do it as fast as possible."  And it helps if
  815. that's _true_, i.e. if you don't have to lie to CopyBits in order to get
  816. the speed.
  817.  
  818. One of the ways to do this, and probably the easiest, is to set your
  819. offscreen (source) pixmap's pmTable field to be equal to your GDevice's
  820. pixmap's pmTable field.  Since that field is a handle, your offscreen
  821. pixmap's color table will then and thenceforth be exactly equal to
  822. your onscreen pixmap's.
  823.  
  824. (Another way, which is probably harder, is to set the offscreen's
  825. (**pmTable).ctSeed equal to the onscreen's (**pmTable).ctSeed.  But
  826. then, unless you update your offscreen pmTable every time you change
  827. your onscreen pmTable, you'll be lying to CopyBits, and you may
  828. experience nasty-looking colors if you ever try to open a port and draw
  829. into the pixmap.)
  830.  
  831. Once you've done that, open up a window on that GDevice and attach a
  832. palette to it.  Set the usage of every color that's important to you to
  833. pmAnimated+pmExplicit.  Then, when you need to set colors, change the
  834. colors' values and call AnimatePalette().  The pmAnimated usage will
  835. mean that the colors won't be used by any other windows, and the
  836. pmExplicit usage will mean that palette entry n will correspond to CLUT
  837. entry n.
  838.  
  839. How's that sound?
  840. - -- 
  841.  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
  842.  If I see one more goddam signature virus, I'm gonna scream.
  843.  
  844. ---------------------------
  845.  
  846. From: ward1@husc8.harvard.edu (Lester Ward)
  847. Subject: Debugging INITs
  848. Date: 7 Jul 92 18:02:49 GMT
  849.  
  850. This has probably been beat to death here, but I didn't see it in the FAQ
  851. sheets.  What is the best way to debug INITs using MPW?
  852.  
  853. Please mail,
  854. I'll summerize,
  855. Thanks,
  856. Les
  857.  
  858. +++++++++++++++++++++++++++
  859.  
  860. From: peirce@outpost.SF-Bay.org (Michael Peirce)
  861. Date: 7 Jul 92 23:34:08 GMT
  862. Organization: Peirce Software
  863.  
  864.  
  865. In article <ward1.710532169@husc8> (comp.sys.mac.programmer), ward1@husc8.harvard.edu (Lester Ward) writes:
  866. > This has probably been beat to death here, but I didn't see it in the FAQ
  867. > sheets.  What is the best way to debug INITs using MPW?
  868.  
  869. Jasik's The Debugger can be setup to debug INITs so you can step through
  870. your INIT at the source level.  
  871.  
  872. An alternative is to sprinkle lots of DebugStr's throughout your code
  873. and do a lot of rebooting (hey, this works :-) with MacsBug installed.
  874.  
  875. - --  Michael Peirce      --   peirce@outpost.SF-Bay.org
  876. - --  Peirce Software     --   Suite 301, 719 Hibiscus Place
  877. - --                      --   San Jose, California USA 95117
  878. - --  Makers of...        --   voice: (408) 244-6554 fax: (408) 244-6882
  879. - --            SMOOTHIE  --   AppleLink: peirce & America Online: AFC Peirce
  880.  
  881. ---------------------------
  882.  
  883. End of C.S.M.P. Digest
  884. **********************
  885.